<?php
// +----------------------------------------------------------------------
// | INPHP
// | Copyright (c) 2023 https://inphp.cc All rights reserved.
// | Author: 幺月儿(https://gitee.com/lulanyin) Email: inphp@qq.com
// | 该文件的开源协议以所在项目的LICENSE文件为准，请遵守开源协议要求
// +----------------------------------------------------------------------
// | 单个焦点轮播图调取
// +----------------------------------------------------------------------
namespace app\cms\tags;

class focus extends aTag
{
    public static function process(array $params): array
    {
        $params = self::initParams($params);
        $item = (new \app\cms\http\api\focus())->index($params);
        if ($item->error !== 0) {
            return [];
        }
        $pictures = $item->data["pictures"];
        return is_array($pictures) ? $pictures : [];
    }
}